package com.cenwangkeji.resident.ui.adapter;

import android.support.annotation.Nullable;

import com.cenwangkeji.resident.R;
import com.cenwangkeji.resident.model.bean.MessageHistoryBean;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

/**
 * @松 on 2019/11/7 10:47
 */
public class MessageAdapterr extends BaseQuickAdapter<MessageHistoryBean.DataBean.RowsBean, BaseViewHolder> {
    public MessageAdapterr( @Nullable List<MessageHistoryBean.DataBean.RowsBean> data) {
        super(R.layout.item_message, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, MessageHistoryBean.DataBean.RowsBean item) {
                      helper.setText(R.id.tv_content, item.getMsg());
                      helper.setText(R.id.tv_date, "时间:  "+item.getPushDate());
                     if (item.getStatus()==1){
                         helper.setText(R.id.tv_state, "已读");
                     }else {
                         helper.setText(R.id.tv_state, "未读");

                     }
    }
}
